<script setup lang="ts">
import { request } from '@/utils/request'
import { onMounted } from 'vue'
import type { User } from './types/user'
onMounted(async () => {
  // const res = await instance<
  //   User,
  //   { code: number; data: User; message: string }
  // >({
  //   url: '/login/password',
  //   method: 'post',
  //   data: {
  //     mobile: '13230000003',
  //     password: 'abc12345'
  //   }
  // })
  const res = await request<User>('/login/password', 'post', {
    mobile: '13230000003',
    password: 'abc12345'
  })
  console.log(res.data.token)
})
</script>

<template>
  <router-view></router-view>
</template>

<style lang="scss" scoped></style>
